<style>
    body {
        margin: 0;
        padding: 0;
        font-family: 'Microsoft YaHei';
        background-color: rgb(245, 245, 245);
    }

    img {
        width: 100%;
    }

    h1 {
        text-align: center;
        line-height: 20px;
    }

    .weui-article {
        padding: 5px 15px;
    }

    small {
        color: #0b720b;
    }

    h2 {
        color: #0b720b;
    }

    .swiper {
        --swiper-theme-color: #ff6600;
        /* 设置Swiper风格 */
    }

    .map {
        width: 100%;
        height: 300px;
    }
</style>

<!-- 引入百度地图API文件 -->
<script type="text/javascript"
    src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=GKQgCv8IQXpYltUqeMlLhTzsj5NC92L0"></script>

<body>
    <!-- 轮播图 -->
    <div class="swiper">
        <div class="swiper-wrapper">
            {foreach $toplist as $item}
            <div class="swiper-slide">
                <a href="#">
                    <img src="{$item.thumbs_text}">
                    <p class="mui-slider-title" style="opacity: .6;">{$item.title}</p>
                </a>
            </div>
            {/foreach}
        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>
    </div>

    <article class="weui-article" style="text-align: center;
    background-color: white;">
        <h1>联&nbsp;系&nbsp;我&nbsp;们<br /><small>Contact Us</small></h1>
        <section>
            <h2 class="title">联系方式</h2>
            <section>
                <h3>市场销售&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:185-1242-1111" style="color: green;">185-1242-1111</a></h3>
                <h3>技术支持&nbsp;&nbsp;&nbsp;&nbsp;<a href="139-1234-5678" style="color: green;">139-1234-5678</a></h3>
                <h3>市场销售&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:178-1422-3211" style="color: green;">178-1422-3211</a></h3>
                <h3>市场销售&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:152-2233-6555" style="color: green;">152-2233-6555</a></h3>
            </section>
            <h2 class="title">地址</h2>
            <section>
                <h3>广东省广州市海珠区</h3>
            </section>
        </section>
    </article>


    <!-- 地图 -->
    <div class="map" id="map"></div>
    <br />
    <br />
    <br />

    {include file="common/footer" /}
</body>

<script src="/assets/home/js/swiper-bundle.min.js"></script>

<script>
    var slider = mui("#slider");
    slider.slider({
        interval: 5000
    });

    var mySwiper = new Swiper('.swiper', {
        direction: 'horizontal', // 垂直切换选项
        loop: true, // 循环模式选项
        autoplay: true,//可选选项，自动滑动
        // 如果需要分页器
        pagination: {
            el: '.swiper-pagination',
        },
        autoplay: {
            disableOnInteraction: false,
        },
        grabCursor: true,
    })
    new Swiper('.swiper')
    var mySwiper = document.querySelector('.swiper').swiper
    mySwiper.slideNext();


    // 地图
    var map = new BMapGL.Map("map"); // 创建地图实例 
    var point = new BMapGL.Point(113.32115, 23.10259);  // 创建点坐标 
    map.centerAndZoom(point, 20); // 初始化地图，设置中心点坐标和地图级别
    var scaleCtrl = new BMapGL.ScaleControl();  // 添加比例尺控件
    map.addControl(scaleCtrl);
    var zoomCtrl = new BMapGL.ZoomControl();  // 添加缩放控件
    map.addControl(zoomCtrl);
    var cityCtrl = new BMapGL.CityListControl();  // 添加城市列表控件
    map.addControl(cityCtrl);
    map.enableScrollWheelZoom(true);   //开启鼠标滚轮缩放
</script>